package org.gy.T11.t8;

import org.junit.*;

public class StringUtilTest {

    @Test
    public void testPrintNumber() {
        StringUtil.printNumber("admin");
        StringUtil.printNumber(null);
    }

    @Test
    public void testGetMaxIndex(){
        int index1 = StringUtil.getMaxIndex(null);
        System.out.println(index1);
        int index2 = StringUtil.getMaxIndex("admin");
        System.out.println(index2);
//断⾔机制：预测index2的结果
        Assert.assertEquals("⽅法内部有Bug",4,index2);
    }

    @Before
    public void test1(){
        System.out.println("--> test1 Before 执⾏了");
    }
    @BeforeClass
    public static void test11(){
        System.out.println("--> test11 BeforeClass 执⾏了");
    }
    @After
    public void test2(){
        System.out.println("--> test2 After 执⾏了");
    }
    @AfterCalss
    public static void test22(){
        System.out.println("--> test22 AfterCalss 执⾏了");
    }
}

